# 用户表
struct User {
  1: optional i64 id,
  2: optional string username,
  3: optional string email,
  4: optional string phone,
  5: optional string createTime,
  6: optional string deleteTime,
  7: optional i64 status,
  8: optional string password,
  9: optional string uuid,   # 一个商家只能个店铺
}

struct DefaultResult {
  1: optional i64 code,
  2: optional string msg,
}

service FoodPlatformService {

  #########   用户表   #######
  # 注册用户
  User registerUser(1: User user) (api.post = "/user/register")
  # 登录
  User login(1: User user) (api.post = "/user/login")
  # 获取用户信息
  User getUserInfo(1: i64 id) (api.get = "/user/info/:id")
  # 修改用户信息
  User editUserInfo(10: User user) (api.post = "/user/edit")
  # 修改密码
  DefaultResult editPassword(1: User user) (api.post = "/user/editPassword")
  # 退出登录
  DefaultResult logout(1: User user) (api.get = "/user/logout")
  # 删除用户
  DefaultResult deleteUser(1: i64 id) (api.post = "/user/delete/:id")
}